<?php
/**
 * アパマン48キャンペーン先行抽選モデルクラス<br />
 *
 * @package apamanshop
 * @author H.Imamura
 * @copyright (c) 2012 SystemSoft Corp. All rights reserved
 */
class Inquiry_Model_Akb201207 extends Inquiry_Model_Apibase
{
	/**
	 * 応募ログ登録
	 *
	 * @return 
	 */
	public function insertEntryLog($params, $db)
	{
		$db_params = array();
		
		$sql  = "INSERT INTO CAMPAIGN_USER.C2012_AKB48_PRE_ENTRY_LOG (";
		$sql .= "  C12_NAME";
		$sql .= " ,C12_MAIL";
		$sql .= " ,C12_TEL";
		$sql .= " ,C12_SEX";
		$sql .= " ,C12_YUUBIN";
		$sql .= " ,C12_ADDRESS";
		$sql .= " ,C12_TARGET";
		$sql .= " ,C12_MESSAGE";
		$sql .= ") VALUES (";
		$sql .= "  :name";
		$sql .= " ,:mail";
		$sql .= " ,:tel";
		$sql .= " ,:sex";
		$sql .= " ,:yuubin";
		$sql .= " ,:address";
		$sql .= " ,:target";
		$sql .= " ,:message";
		$sql .= ")";
		
		$db_params['name']    = $params['Name'];
		$db_params['mail']    = $params['Mail'];
		$db_params['tel']     = $params['Tel'];
		$db_params['sex']     = $params['Sex'];
		$db_params['yuubin']  = $params['Zip'];
		$db_params['address'] = $params['Address'];
		$db_params['target'] = $params['Target'];
		$db_params['message'] = $params['Message'];
		
		return $this->dbExecQuery($sql, $db_params, $db);
	}

}
?>
